﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using LinkShareWpf.ViewModel;
using LinkShareWpf.Properties;

namespace LinkShareWpf
{
	/// <summary>
	/// Logica di interazione per Option.xaml
	/// </summary>
	public partial class Option : Window
	{
				
		public Option()
		{
		    InitializeComponent();
            (DataContext as OptionWindowViewModel).CloseWindowRequested += delegate { Close(); };
		}

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new System.Windows.Forms.FolderBrowserDialog();
            dialog.SelectedPath = coversPathBox.Text;
            System.Windows.Forms.DialogResult result = dialog.ShowDialog();
            if (!dialog.SelectedPath.Equals(string.Empty))
                coversPathBox.Text = dialog.SelectedPath;
        }

    }

}